package com.david.dubbo.xml;

import com.david.dubbo.xml.domain.User;
import com.david.dubbo.xml.service.DavidService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author David
 * @version V1.0
 * @Package com.david.dubbo.xml
 * @date 2021/4/11 10:02
 */
public class DavidConsumerApplication {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:dubbo-consumer.xml");
        context.start();
        DavidService service = context.getBean(DavidService.class);
        User user = service.queryUserById(5);
        System.out.println("user = " + user);
    }
}
